import React, { Component } from 'react'

export default class a extends Component {
    state = { n: 1 }
    get n() {
        return this.state.n * 100 + 3

    } set n(val) {
        console.log(val);
    }
    setN = (e) => {
        this.setState({ n: e.target.value })
    }
    render() {
        let { n } = this.state
        return (
            <div>
                <p>{n}</p>
                <input type="text" onChange={this.setN} value={this.state.n} />
            </div>
        )
    }
    
}
